﻿@if (Request.IsAuthenticated)
{
    <text> Olá, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null,
        htmlAttributes: new { @class = "username", title = "Manage" })!
    <br />
    <br />
    @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
    {
        @Html.AntiForgeryToken()
        <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
    }
    </text>
}
else
{
    <ul>
        @if (System.Web.Configuration.WebConfigurationManager.AppSettings["RegistoAutorizado"].AsBool() == true)
        {
            <li>@Html.ActionLink("Registar", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        }
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>

        <li>@Html.ActionLink("Recuperar Password", "ResetPassword", "Account")</li>
    </ul>
}
